import type { PageParams, PageResult } from '@/types/global'
import type { BannerItem, GuessItem, categoryItem, hotItem } from '@/types/home'
import { http } from '@/utils/http'
// 首页广告轮播图
export const getHomeBanner = (data: {}) => {
  return http<BannerItem[]>({
    url: '/home/banner',
    method: 'GET',
    data,
  })
}

// 首页分类图标文字
export const getHomeCategoryMutli = (data: {}) => {
  return http<categoryItem[]>({
    url: '/home/category/mutli',
    method: 'GET',
    data,
  })
}

// 首页热门推荐
export const getHomeHotMutli = (data: {}) => {
  return http<hotItem[]>({
    url: '/home/hot/mutli',
    method: 'GET',
    data,
  })
}

// 猜你喜欢热门推荐
export const getGuessGoods = (data?: PageParams) => {
  return http<PageResult<GuessItem>>({
    url: '/home/goods/guessLike',
    method: 'GET',
    data,
  })
}
